package groupb6.shopsystem.messaging.entity;

import groupb6.shopsystem.pojo.entity.Message;
import lombok.Data;

import java.util.List;

@Data
public class WBResponse {
    private List<Message> messages;
    private String status;
    //type为message或者status（暂定）
    private String type;
//    private Integer code;
//    private String status;

    void setType(String type){
        switch(type){
            case "message":
                this.type=type;
                break;
            case "status":
                this.type=type;
                break;
            default:
                throw new RuntimeException("消息类型错误");
        }
    }
}
